//
//  WKSearchResultCell.m
//  WeKeTang
//
//  Created by ichina on 2017/9/26.
//  Copyright © 2017年 Dezhi Tiancheng Education Technology (Beijing) Co. Ltd. All rights reserved.
//

#import "WKSearchResultCell.h"
#import <UIImageView+WebCache.h>

@interface WKSearchResultCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImgView;


@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation WKSearchResultCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}
-(void)setModel:(WKSearchResultModel *)model{
    _model = model;
    [self.iconImgView setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kTestMainUrl,model.section_imgurl]] options:YYWebImageOptionShowNetworkActivity];
//    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kTestMainUrl,model.section_imgurl]]];
//    NSLog(@"搜索图片地址:%@",[NSString stringWithFormat:@"%@%@",kTestMainUrl,model.section_imaurl]);
//    UIImage *image = [UIImage imageWithData:data];
//    self.iconImgView.image = image;
    self.titleLabel.text = model.section_name;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
